#include <GameWorld.hpp>
#include <Player.hpp>
#include <GameState.hpp>

GameWorld::GameWorld(EE::GameState *statePtr) :
	state(statePtr)
{
	player = new Player(this);
}

void GameWorld::MoveLeft(unsigned long time)
{
	player->MoveLeft(((float) time / 1000.0) * PLAYER_SPEED);
}

void GameWorld::MoveRight(unsigned long time)
{
	player->MoveRight(((float) time / 1000.0) * PLAYER_SPEED);
}

void GameWorld::MoveUp(unsigned long time)
{
	player->MoveUp(((float) time / 1000.0) * PLAYER_SPEED);
}

void GameWorld::MoveDown(unsigned long time)
{
	player->MoveDown(((float) time / 1000.0) * PLAYER_SPEED);
}

sf::Sprite &GameWorld::GetSprites()
{
	return player->Draw();
}
